$(function() {
    $.ajax({
        type: 'GET',
        url: serverPort + '/ddApi/socialOb/getSocialUserInfo?openId=' + openId,
        dataType: 'json',
        success: function(res) {
           var userData =  res.data
           console.log(userData)
           var userDataHtml = `
           <!-- 用户头像 -->
           <div class='user-phto'>
               <div>
                   <img src="${userData.headUrl}" alt="">
               </div>
               <a href="#">编辑资料</a>
           </div>
           <!-- 简单信息 -->
           <div class='simple-data'>
               <h4>${userData.nickName}</h4>
               <p>手机：<span>${userData.phoneNum}</span></p>
               <p>积分： <span>${userData.integral}</span></p>
           </div>
           `
    
           $('.cb-centent').prepend(userDataHtml)
        },
        error: function(res) {
            console.log(res)
        }
    })
})